﻿using System;
using System.Collections.Generic;
using Abp.Domain.Entities.Auditing;
using Camc.Quality.ProcessRoute;
using Camc.Quality.Quality;
using JetBrains.Annotations;

namespace Camc.Quality.Bop
{
    /// <summary>
    ///     任务表
    /// </summary>
    public class BopDesc : FullAuditedEntity<Guid>
    {
        /// <summary>
        ///     1.型号
        /// </summary>
        public string Model { get; set; }

        /// <summary>
        ///     2.型号名称
        /// </summary>
        public string ModelName { get; set; }

        /// <summary>
        ///     3.发次
        /// </summary>
        public string LotNo { get; set; }

        /// <summary>
        /// 型号Id
        /// </summary>
        public Guid? ModelId { get; set; }
        /// <summary>
        /// 发次Id
        /// </summary>
        public Guid? LotNoId { get; set; }

        /// <summary>
        ///     4.图号
        /// </summary>
        public string DrawingNo { get; set; }

        /// <summary>
        ///     5.阶段标识
        /// </summary>
        public string StageSign { get; set; }

        /// <summary>
        ///     6.Bop状态
        /// </summary>
        public Status Status { get; set; }
        /// <summary>
        ///     7.属性
        /// </summary>
        public Properties Property { get; set; }

        /// <summary>
        ///     8.是否启用
        /// </summary>
        public IsUsed IsUsed { get; set; }

        /// <summary>
        ///     9.发布时间
        /// </summary>
        public DateTime? ReleaseTime { get; set; }

        /// <summary>
        ///     10.发布者
        /// </summary>
        public long? ReleaseUserId { get; set; }

        /// <summary>
        ///     质量包状态
        /// </summary>
        public QualityStatus QualityStatus { get; set; }

        //建立表外键
        public ICollection<BopNode> BopNodes { get; set; }

        /// <summary>
        ///     版本
        /// </summary>
        public string Edition { get; set; }

        /// <summary>
        ///     工艺路线状态
        /// </summary>
        public ProcessStatus ProcessStatus { get; set; }

        /// <summary>
        ///     工时
        /// </summary>
        public decimal WorkingHour { get; set; }

        /// <summary>
        ///     工时计算方式  0工序 1 工步
        /// </summary>
        public string WorkingHourStatus { get; set; }

        #region 工艺路线

        /// <summary>
        ///     前端所需坐标
        /// </summary>
        public string Loc { get; set; }

        /// <summary>
        ///     详情
        /// </summary>
        public string Details { get; set; }

        /// <summary>
        ///     形状
        /// </summary>
        public string Figure { get; set; }

        /// <summary>
        ///     字体和边框颜色
        /// </summary>
        public string Color { get; set; }

        /// <summary>
        ///     大小
        /// </summary>
        public int Size { get; set; }

        /// <summary>
        ///   底色
        /// </summary>
        public string Fill { get; set; }
        #endregion

        #region 排配计划
        [CanBeNull]
        /// <summary>
        /// 计划开始时间
        /// </summary>
        public DateTime? StartTime { get; set; }
        [CanBeNull]
        /// <summary>
        /// 计划完成时间
        /// </summary>
        public DateTime? EndTime { get; set; }
        #endregion

        [CanBeNull]
        /// <summary>
        /// 配套状况
        /// </summary>
        public AssortStatus? AssortState { get; set; }
    }
}